@extends("layouts/admin")
@section('title',"分类列表")
@section('main')
    <h3>分类列表</h3>
    <table class="table table-bordered table-condensed table-hover table-striped">
        <tr>
            <td>ID</td>
            <td>名称</td>
            <td>是否推荐</td>
            <td>操作</td>
        </tr>
        @foreach($arr as $v)
            <tr>
                <td>{{$v['id']}}</td>
                <td>{{$v['indentcname']}}</td>
                <td>
                    @if($v['recommend']==0)
                        <span class="text-danger">不推荐</span>
                    @else
                        <span class="text-danger">推荐</span>
                    @endif
                </td>
                <td>
                    <a href="{{url('admin/category/edit',['id'=>$v['id']])}}" class="btn btn-primary">编辑</a>
                    <a href="{{url('admin/category/del',['id'=>$v['id']])}}" class="btn btn-danger">删除</a>
                </td>
            </tr>
        @endforeach
    </table>
@endsection
